package org.tgcloud.group.repository;

import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.tgcloud.group.entity.MjOtherProject;
import org.tgcloud.group.web.controller.dto.otherProject.OtherProjectAppMsgDTO;
import org.tgcloud.group.web.controller.dto.otherProject.OtherProjectDTO;

import java.math.BigDecimal;
import java.util.List;
import java.util.Map;

/**
 * @Author: zhy
 * @Created: 2024-06-24-下午2:47
 * @Description: ${description}
 */
@Mapper
public interface MjOtherProjectMapper {
    int deleteByPrimaryKey(Integer id);

    int insert(MjOtherProject record);

    int insertSelective(MjOtherProject record);

    MjOtherProject selectByPrimaryKey(Integer id);

    int updateByPrimaryKeySelective(MjOtherProject record);

    int updateByPrimaryKey(MjOtherProject record);

    int updateStatusById(@Param("id") Integer id, @Param("status") Short status);

    List<OtherProjectDTO> getList(@Param("keyword") String keyword);

    OtherProjectAppMsgDTO selectAppMsgById(@Param("id") Integer id, @Param("userStatusSearch") String userStatusSearch,
                                           @Param("userType") Short userType, @Param("userFirstPriceSearch") String userFirstPriceSearch,
                                           @Param("userSecondPriceSearch") String userSecondPriceSearch,
                                           @Param("userFirstRankNumSearch") String userFirstRankNumSearch);

    int doResetAppOtherProject(@Param("id") Integer id);

    int updateUserStatusById(@Param("id") Integer id, @Param("userStatusSearch") String userStatusSearch, @Param("status") Short status);

    int updateChannelById(@Param("id") Integer id, @Param("userSearch") String userSearch,
                          @Param("dto") Map<String, Object> dto);

    List<MjOtherProject> selectTaskList();

    int updateStartTwoBidding(@Param("id") Integer id, @Param("userId") int userId, @Param("endTime") String endTime);

    int updateChannelStatusById(@Param("id") Integer id, @Param("key") String key, @Param("status") int status);

    int updateFirstLastUserIdById(@Param("id") Integer id, @Param("lastUserId") Integer lastUserId, @Param("lastPrice") BigDecimal lastPrice);

    int updateSecondLastUserIdById(@Param("id") Integer id, @Param("lastUserId") Integer lastUserId, @Param("lastPrice") BigDecimal lastPrice);

}